package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QuickMarkRecordMapper;
import com.ruoyi.system.domain.QuickMarkRecord;
import com.ruoyi.system.service.IQuickMarkRecordService;

/**
 * 二维码生成记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-15
 */
@Service
public class QuickMarkRecordServiceImpl implements IQuickMarkRecordService
{
    @Autowired
    private QuickMarkRecordMapper quickMarkRecordMapper;

    /**
     * 查询二维码生成记录
     *
     * @param id 二维码生成记录主键
     * @return 二维码生成记录
     */
    @Override
    public QuickMarkRecord selectQuickMarkRecordById(Long id)
    {
        return quickMarkRecordMapper.selectQuickMarkRecordById(id);
    }

    /**
     * 查询二维码生成记录列表
     *
     * @param quickMarkRecord 二维码生成记录
     * @return 二维码生成记录
     */
    @Override
    public List<QuickMarkRecord> selectQuickMarkRecordList(QuickMarkRecord quickMarkRecord)
    {
        return quickMarkRecordMapper.selectQuickMarkRecordList(quickMarkRecord);
    }

    /**
     * 新增二维码生成记录
     *
     * @param quickMarkRecord 二维码生成记录
     * @return 结果
     */
    @Override
    public int insertQuickMarkRecord(QuickMarkRecord quickMarkRecord)
    {
        quickMarkRecord.setCreateTime(DateUtils.getNowDate());
        return quickMarkRecordMapper.insertQuickMarkRecord(quickMarkRecord);
    }

    /**
     * 修改二维码生成记录
     *
     * @param quickMarkRecord 二维码生成记录
     * @return 结果
     */
    @Override
    public int updateQuickMarkRecord(QuickMarkRecord quickMarkRecord)
    {
        quickMarkRecord.setUpdateTime(DateUtils.getNowDate());
        return quickMarkRecordMapper.updateQuickMarkRecord(quickMarkRecord);
    }

    /**
     * 删除二维码生成记录信息
     *
     * @param id 二维码生成记录主键
     * @return 结果
     */
    @Override
    public int deleteQuickMarkRecordById(Long id)
    {
        return quickMarkRecordMapper.deleteQuickMarkRecordById(id);
    }
}
